package xin.marcher.module.diplomacy.controller;

import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import xin.marcher.module.common.core.JsonResult;
import xin.marcher.module.diplomacy.api.ProductCollectApi;
import xin.marcher.module.diplomacy.domain.dto.ProductDetailDTO;
import xin.marcher.module.diplomacy.domain.query.ProductDetailQuery;

/**
 * 
 */
@RestController
@RequestMapping("/product/diplomacy/product")
public class ProductController {

    @DubboReference(version = "1.0.0")
    private ProductCollectApi productCollectService;


    @PostMapping("/detail")
    public JsonResult<ProductDetailDTO> getProductDetail(@RequestBody ProductDetailQuery productDetailQuery) {
        return productCollectService.getProductDetail(productDetailQuery);
    }

}
